package com.whfc.common.vs.ezviz.enums;

/**
 * @Description: 萤石云视频监控设备状态
 * @author: lk
 * @version: 1.0
 * @date: 2021/3/2 14:05
 */
public enum  EzvizDeviceStatus {

    OFFLINE(0, "离线"),

    ONLINE(1, "在线"),

    FAIL(2, "失败");

    private Integer value;

    private String desc;

    EzvizDeviceStatus(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static EzvizDeviceStatus parseValue(Integer value) {
        switch (value) {
            case 1:
                return ONLINE;
            case 2:
                return FAIL;
            default:
                return OFFLINE;
        }
    }
}
